package org.benxiong.iplay.model;

public class Message {

	private String	sender;
	private String	receiver;

	private String	text;
	private Double	latitude;
	private Double	longitude;

	private String	info;
	private int		type;
	private long	time;

	private int		mine;
	private boolean	fromServer;

	public Conversation toConversation() {
		Conversation c = new Conversation();
		c.setFromServer(false);
		return c;
	}

	public int getMine() {
		return mine;
	}

	public void setMine(int mine) {
		this.mine = mine;
	}

	public boolean isFromServer() {
		return fromServer;
	}

	public void setFromServer(boolean fromServer) {
		this.fromServer = fromServer;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	@Override
	public String toString() {
		return "Message [sender=" + sender + ", receiver=" + receiver + ", text=" + text + ", latitude=" + latitude + ", longitude=" + longitude
				+ ", info=" + info + ", type=" + type + ", time=" + time + ", mine=" + mine + ", fromServer=" + fromServer + "]";
	}

}
